/**
 * 
 */
package builder;

/**
 * @author boboges
 *
 */
public class Do {
    public static void main(String[] args) {
        CatchModel catchModel = new CatchModel();
        CatchModelBuilder beginEndBudiler = new FreeStyleModelBuilder(catchModel);
        Director d = new Director(beginEndBudiler);
        d.build();
        System.out.println(catchModel.getCatchHead());

        System.out.println("----------------第二种---------------------");

        Director1 director1 = new Director1(new CatchAndPushModelBuilder());
        CatchModel catchModel1 = director1.build();
        System.out.println(catchModel1.getCatchHead());

        System.out.println("----------------第三种 简化第二种---------------------");
        CatchModel catchModel2 = new FixedCatchModelBuilder().build();
        System.out.println(catchModel2.getCatchHead());

        System.out.println("----------------链式建造者模式参数---------------------");
        CatchModelWithBuilder catchModel3 = new CatchModelWithBuilder.CatchModelBuilder().setCatchHead("mmmm")
                .setCathBody("bbbb").build();
        System.out.println(catchModel3.getCatchHead());

    }
}
